package com.sixth.statistics.service.impl;

import com.sixth.core.entity.OrderBackfee;
import com.sixth.core.vo.R;
import com.sixth.statistics.service.OrderBackFeeService;
import com.sixth.statistics.mapper.OrderBackFeeMapper;
import com.sixth.statistics.vo.OrderBackFeeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: six-hospital-system
 * @description:
 * @author: 朱永奇
 * @create: 2024-08-22 15:04
 **/
@Service
public class OrderBackFeeImpl implements OrderBackFeeService {
    @Autowired
    private OrderBackFeeMapper orderBackFeeMapper;
    /**
     * 获取退费总金额
     * @param orderBackFeeVo
     * @return
     */
    @Override
    public R<List<OrderBackfee>> selectAllBack(OrderBackFeeVo orderBackFeeVo) {
        List<OrderBackfee> orderBackfees = orderBackFeeMapper.selectListOrderBackFee(orderBackFeeVo);
        return R.ok(orderBackfees);
    }

    /**
     * 获取退费详情
     * @param orderBackFeeVo
     * @return
     */
    @Override
    public R<List<OrderBackfee>> selectAllBackFee(OrderBackFeeVo orderBackFeeVo) {
        List<OrderBackfee> orderBackfees = orderBackFeeMapper.selectListOrderBack(orderBackFeeVo);
        return R.ok(orderBackfees);
    }
}
